BASE_DIR = ../..
include $(BASE_DIR)/include.mak

TARGET = FSS_FTPD

EXPORTED_OBJS = $(PSPRADIO_DIR)/PSPRadioExports.o 
OBJS = main.o ftp_main.o ftp.o _itoa.o sutils.o \
		$(EXPORTED_OBJS)

# Define to build this as a prx (instead of a static elf)
BUILD_PRX=1
USE_PSPSDK_LIBC = 0
# Define the name of our custom exports (minus the .exp extension)
PRX_EXPORTS=$(PLUGINS_DIR)/FSS_Exports.exp

INCDIR = ./ $(PLUGINS_DIR) $(BASE_DIR) $(PSPRADIO_DIR) $(SHAREDLIB_DIR)/PSPApp \
		 $(SHAREDLIB_DIR)/libpspnet $(SHAREDLIB_DIR)/libiniparser \
		 $(SHAREDLIB_DIR)/Logging $(PLUGINS_DIR)/Common
		 
CFLAGS = $(GLOBAL_CFLAGS) -G0 -O0 -g -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBDIR = $(SHAREDLIB_DIR)/lib $(PLUGINS_DIR)/Common
LDFLAGS =
LIBS = -lstdc++  -lPSPApp -liniparser -lPluginCommon

all: $(TARGET).prx

install:
	mkdir -p $(PSPRADIO_RELEASE_DIR)/$(TARGET)
	cp -vf $(TARGET).prx $(PSPRADIO_RELEASE_DIR)
	cp -vf *.cfg $(PSPRADIO_RELEASE_DIR)/$(TARGET)

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
